﻿@model UserLinksModel
@using Nop.Web.Models.Common;

@if (Model.IsAuthenticated)
{
    <a href="@Url.RouteUrl("CustomerInfo")" class="header-link-top">
        <i class="fa fa-user"></i><br />
        <span class="header-link-name">@T("Menu.MyHUB")</span>
    </a>
    <div id="user-links" class="dropdown-wrapper">
        <div class="dropdown-item">
            <div class="user-links-wrapper">
                <ul>
                    @if (Model.DisplayAdminLink)
                    {
                        <li class="hublink"><a href="@Url.Content("~/admin")"><i class="fa fa-cog"></i>@T("Account.Administration")</a></li>
                    }
                    @if (!Model.HideTracking)
                    {
                        <li class="offerlink"><a href="@Url.RouteUrl("CustomerTracking")"><i class="fa fa-crosshairs"></i>@T("Account.CustomerTracking")</a></li>
                    }
                    <li class="timelink"><a href="@Url.RouteUrl("CustomerOrders")"><i class="fa fa-clipboard"></i>@T("Account.CustomerOrders")</a></li>
                    @if (!Model.HideInvoices)
                    {
                        <li class="invoicelink"><a href="@Url.RouteUrl("CustomerInvoices")"><i class="fa fa-file-text-o"></i>@T("Account.CustomerInvoices")</a></li>
                    }
                    <li class="signupaccountlink"><a href="@Url.RouteUrl("CustomerInfo")" rel="nofollow"><i class="fa fa-info"></i>@T("Account.CustomerInfo")</a></li>
                    <li class="passwordlink"><a href="@Url.RouteUrl("CustomerChangePassword")"><i class="fa fa-key"></i>@T("Account.ChangePassword")</a></li>
                    <li class="maplink"><a href="@Url.RouteUrl("CustomerAddresses")"><i class="fa fa-book"></i>@T("Account.CustomerAddresses")</a></li>
                    <li class="emaillink"><a href="@Url.RouteUrl("CustomerSettings")"><i class="fa fa-gear"></i>@T("Account.CustomerSettings")</a></li>
                    <li class="user-logout"><a href="@Url.RouteUrl("Logout")"><i class="fa fa-lock"></i>@T("Account.Logout")</a></li>
                </ul>
                <div class="clear"></div>
            </div>
        </div>
    </div>
}
else
{
    <a href="@Url.RouteUrl("Login")" class="header-link-top">
        <i class="fa fa-sign-in"></i><br />
        <span class="header-link-name">Login</span>
    </a>
}

<div class="user-info">
    @T("Common.Greeting", Model.CustomerEmailUsername)
    @if (Model.IsAuthenticated)
    {
        <a href="">Logout</a>
    }
    else
    {
        <a href="">Login</a>
    }
</div>